package com.xj.pattern.strategy.impl;

import com.xj.pattern.strategy.InstantiationStrategy;

public class SimpleInstantiationStrategy implements InstantiationStrategy {

	@Override
	public Object instantiate(String bean) {
		//对bean进行实例化
		Object o = null;
		try{
			System.out.println("使用SimpleInstantiationStrategy来实现实例化："+bean);
			o = Class.forName(bean);
		}catch (Exception e) {
		}
		return o;
	}

}
